package com.app.mvvmkotlindemo.request

import androidx.lifecycle.MutableLiveData
import com.app.mvvmkotlindemo.bean.RecordByUserBean
import com.app.mvvmkotlindemo.bean.UpChangesBean
import com.everyline.baselibrary.base.viewmodel.BaseViewModel
import com.everyline.baselibrary.ext.request
import com.everyline.baselibrary.state.ResultState

import com.app.mvvmkotlindemo.network.HttpRequestManger

/**
 * Created by on 2021/1/21.
 * 天天挂线
 *  746608431@qq.com
 *  描述:TODO
 */

class RequestDataCompleteModel : BaseViewModel() {
    var actionRecordByUserData = MutableLiveData<ResultState<RecordByUserBean?>>()
    var giveUpChangesData = MutableLiveData<ResultState<UpChangesBean?>>()

    fun actionRecordByUser() {
        request({ HttpRequestManger.apiService.actionRecordByUser() }, actionRecordByUserData, true)
    }

    fun giveUpChanges() {
        request({ HttpRequestManger.apiService.giveUpChanges() }, giveUpChangesData, true)
    }

}